Skip to content

Fix P0 security and data correctness bugs#79

Merged
galic1987 merged 3 commits intomainfrom
agent-20260315-193914
Mar 16, 2026
Merged

Fix P0 security and data correctness bugs#79
galic1987 merged 3 commits intomainfrom
agent-20260315-193914

Conversation

@galic1987
Copy link
Collaborator

Summary

  • Block unknown tools in safety checker — was silently allowing unregistered tools to execute
  • Restrict paths to working directory when allowed_paths is empty — was permitting access to entire filesystem
  • Fix TTL unit mismatch in local-first cache — current_timestamp() returned milliseconds but TTL values are in seconds, causing cache to expire 1000x too fast (3.6s instead of 1 hour)

Verification

Many other P0 issues from the report were verified as already fixed or by-design:

  • checkpointing.rs — already uses tokio::spawn with tokio::fs
  • execution.rs stdin — already uses tokio::io::stdin async
  • interactive.rs editor — by design (reedline is synchronous, standard for CLIs)
  • local_first.rs integration — already integrated into agent execution
  • chat_store.rs encryption — properly fails closed when enabled
  • swarm.rs RwLock — intentional, documented: locks never held across await points

Test plan

  • cargo test --lib -- safety::checker local_first — 280 passed
  • cargo test --lib — 7374 passed, 1 pre-existing failure (test_repetition_multiple_tools_in_batch)

🤖 Generated with Claude Code

galic1987 and others added 3 commits March 15, 2026 19:40
… report

- Block unknown/unregistered tools in safety checker (was silently allowing)
- Restrict paths to working directory when allowed_paths is empty (was permitting all)
- Fix TTL unit mismatch: current_timestamp() now returns seconds instead of
  milliseconds, fixing cache entries expiring 1000x too fast (3.6s vs 1 hour)
- Update tests to match new stricter security behavior

Fixes 3 of the 12 P0 issues from CONSOLIDATED_BROKEN_IMPLEMENTATIONS_REPORT.md.
Several other P0 items verified as already fixed or by-design.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@galic1987 galic1987 merged commit 4f78b8a into main Mar 16, 2026
6 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant